<template>
	<view class="trading-detatils">
		<view class="trading-detatils-type">
			<view class="iconfont icon-zengjia" :class="{'icon-jianshao': detailData.type > 2}"></view>
			<view class="sum">{{detailData.type > 2 ? '-' : '+'}}{{detailData.sum}}{{type}}</view>
			<view class="sum-type1" :class="{'sum-type2': detailData.type > 2}">{{type}}{{detailData.type > 2 ? '付款' : '收款'}}成功</view>
		</view>
		<van-cell-group>
		  <van-cell
			title="发送地址"
			:label="detailData.sendToken"
		  />
		   <van-cell
			title="接收地址"
			:label="detailData.receiveToken"
		  />
		  <van-cell
			title="交易时间"
			:label="detailData.time"
		  />
		  <van-cell
			title="备注"
			:label="detailData.remark"
		  />
		</van-cell-group>
		
	</view>
</template>
<script>
	import { mapGetters } from 'vuex'
	export default {
		data() {
			return {
				type: '积分'
			}
		},
		onLoad (option) {
			this.type = option.type == 1 ? '积分' : 'WNCT'
			
		},
		onShow () {
		},
		computed: {
			...mapGetters({
				detailData: 'getTRDetailsData'
			}),
		},
		methods: {
		},
		components: {
		}
	}
</script>
<style scoped lang="scss">
.trading-detatils {
	&-type {
		padding: 40upx 0;
		text-align: center;
		background-color: #fff;
	}
	.iconfont {
		font-size: 120upx;
	}
	.icon-zengjia, .sum-type1 {
		color: #00ff1e;
	}
	.icon-jianshao, .sum-type2 {
		color: #ff3c00
	}
	.sum {
		margin-top: 20upx;
		margin-bottom: 6upx; 
		font-size: 42upx;
	}
}
</style>
